package com.ruoyi.service.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.service.project.entity.ProjectSettleEntity;
import java.math.BigDecimal;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 项目结算单 Mapper 接口
 * </p>
 *
 * @author Zane
 * @since 2025-10-26
 */
public interface ProjectSettleMapper extends BaseMapper<ProjectSettleEntity> {

  @Select("SELECT SUM(commission) AS totalAmount FROM t_project_settle"
      + " WHERE settle_status = #{settleStatus}")
  BigDecimal getCommission(@Param("settleStatus") Integer settleStatus);

}
